package kgame5.pbe.atlantic.helper {
	import kgame5.pbe.atlantic.param.FSMParam;
	import kgame5.pbe.atlantic.param.ViewParam;

	import flash.utils.Dictionary;

	/**
	 * @author max
	 * 2010-12-13
	 * 
	 * FSMParam和ViewParam的控制器
	 */
	public class ParamsManager {
		private var dict_fsmParam:Dictionary;
		private var dict_viewParam:Dictionary;
		
		public function ParamsManager(){
			dict_fsmParam=new Dictionary();
			dict_viewParam=new Dictionary();
		}
		
		private static var _instance:ParamsManager;
		public static function getInstance():ParamsManager{
			if(_instance==null){
				_instance=new ParamsManager();
			}
			return _instance;
		}
		
		public function addFSMParam(id:int,fsmParam:FSMParam):void{
			dict_fsmParam[id]=fsmParam;
		}
		
		public function addViewParam(id:int,viewParam:ViewParam):void{
			dict_viewParam[id]=viewParam;
		}
		
		public function getFSMParam(id:int):FSMParam{
			return dict_fsmParam[id];
		}
		
		public function getViewParam(id:int):ViewParam{
			return dict_viewParam[id];
		}
	}
}
